/**
 * Defines the main routes in the application.
 * The routes you see here will be anchors '#/' unless specifically configured otherwise.
 */

define(['./app'], function (app) {
    'use strict';
    return app.config(function ($stateProvider,$urlRouterProvider) {

        $urlRouterProvider.otherwise('/error');

        $stateProvider.state('error',{
            url:'/error',
            templateUrl:'404.html'
        }).state('index',{
            url:'/index',
            templateUrl:"app/index/indexmain.html"
        })
        //商品类型和参数路由
        .state('goodstypement',{
            url:'/goodstypement',
            templateUrl:'app/goodstype/goodstypement.html',
            data:{
                operate:'find'
            }
        })
            //商品类型添加
            .state('goodstype',{
                url:'/goodstype',
                templateUrl:'app/goodstype/goodstype.html',
                data:{
                    operate:'save'
                }
            })
            //商品属性查询
            .state('goodsattributement',{
                url:'/goodsattributement',
                templateUrl:'app/goodsattribute/goodsattributement.html',
                data:{
                    operate:'find'
                }
            })
            //商品属性添加
            .state('goodsattribute',{
                url:'/goodsattribute',
                templateUrl:'app/goodsattribute/goodsattribute.html',
                data:{
                    operate:'save'
                }
            })
            //商品品牌查询
            .state('brandment',{
                url:'/brandment',
                templateUrl:'app/brand/brandment.html',
                data:{
                    operate:'find'
                }
            })
            //商品品牌添加
            .state('brand',{
                url:'/brand',
                templateUrl:'app/brand/brand.html',
                params:{
                    'operate':'save'
                }
            })
            //商品类型品牌添加
            .state('goodstypebrand',{
                url:'/goodstypebrand',
                templateUrl:'app/goodstypebrand/goodstypebrand.html',
                data:{
                    operate:'save'
                }
            })
            //商品品牌类型查询
            .state('goodstypebrandment',{
                url:'/goodstypebrandment',
                templateUrl:'app/goodstypebrand/goodstypebrandment.html',
                data:{
                    operate:'find'
                }
            })
            //sku添加
            .state('productsku',{
                url:'/productsku',
                templateUrl:'app/productsku/productsku.html',
                data:{
                    operate:'save'
                }
            })
            //sku查询
            .state('productskument',{
                url:'/productskument',
                templateUrl:'app/productsku/productskument.html',
                data:{
                    operate:'find'
                }
            })
            //商品分类添加
            .state('goodscategory',{
                url:'/goodscategory',
                templateUrl:'app/goodscategory/goodscategory.html',
                data:{
                    operate:'save'
                }
            })
                //商品分类查询
            .state('goodscategoryment',{
                url:'/goodscategoryment',
                templateUrl:'app/goodscategory/goodscategoryment.html',
                data:{
                    operate:'find'
                }
            })
            //商品添加
            .state('goods',{
                url:'/goods',
                templateUrl:'app/goods/goods.html',
                params:{
                    'operate': 'save'
                }
            })
            //商品查询
            .state('goodsment',{
                url:'/goodsment',
                templateUrl:'app/goods/goodsment.html',
                data:{
                    operate:'find'
                }
            })
            //货物添加
            .state('products',{
                url:'/products',
                templateUrl:'app/products/products.html',
                params:{
                    'operate': 'save'
                }
            })
            //货物列表
            .state("productsment",{
                url:"/productsment",
                templateUrl:"app/products/productsment.html",
                data:{
                    operate:'find'
                }
            })
            //商品评论添加
            .state("goodscomment",{
                url:"/goodscomment",
                templateUrl:"app/goodscomment/goodscomment.html",
                data:{
                    operate:'save'
                }
            })
            //商品所有评论查询
            .state("goodscommentment",{
                url:"/goodscommentment",
                templateUrl:"app/goodscomment/goodscommentment.html",
                data:{
                    operate:'find'
                }
            })
            //单个商品的所有评论查询
            .state("goodscommentonement",{
                url:"/goodscommentonement",
                templateUrl:"app/goodscomment/goodscommentonement.html",
                data:{
                    operate:'find'
                }
            })
            //回复评论
            .state("goodscommentreply",{
                url:"/goodscommentreply",
                templateUrl:"app/goodscomment/goodscommentreply.html",
                data:{
                    operate:''
                }
            })
            //回复评论
            .state("goodscommentreplyment",{
                url:"/goodscommentreplyment",
                templateUrl:"app/goodscomment/goodscommentreplyment.html",
                data:{
                    operate:''
                }
            })
            //添加专题信息
            .state("goodsspecial",{
                url:"/goodsspecial",
                templateUrl:"app/goodsspecial/goodsspecial.html",
                params:{
                    'operate': 'save'
                }
            })
            //查询专题
            .state("goodsspecialment",{
                url:"/goodsspecialment",
                templateUrl:"app/goodsspecial/goodsspecialment.html",
                params:{
                    'operate': 'find'
                }
            })
            //查看专题商品
            .state("goodsspecialcontent",{
                url:"/goodsspecialcontent",
                templateUrl:"app/goodsspecial/goodsspecialcontent.html",
                params:{
                    'operate':'edit'
                }
            })
            //查询会员等级
            .state("membergradement",{
                url:"/membergradement",
                templateUrl:"app/membergrade/membergradement.html",
                params:{
                    'operate':'find'
                }
            })
            //添加会员等级
            .state("membergrade",{
                url:"/membergrade",
                templateUrl:"app/membergrade/membergrade.html",
                params:{
                    'operate':'save'
                }
            })
            //会员添加
            .state("member",{
                url:"/member",
                templateUrl:"app/member/member.html",
                params:{
                    'operate':'save'
                }
            })
            //会员查询
            .state("memberment",{
                url:"/memberment",
                templateUrl:"app/member/memberment.html",
                params:{
                    'operate':'find'
                }
            })
            //会员分组查询
            .state("membergroupment",{
                url:"/membergroupment",
                templateUrl:"app/membergroup/membergroupment.html",
                params:{
                    'operate':'find'
                }
            })
            //会员分组添加
            .state("membergroup",{
                url:"/membergroup",
                templateUrl:"app/membergroup/membergroup.html",
                params:{
                    'operate':'save'
                }
            })
            //商户信息列表
            .state("storeinfoment",{
                url:"/storeinfoment",
                templateUrl:"app/storeinfo/storeinfoment.html",
                params:{
                    'operate':'find'
                }
            })
            //商户信息添加
            .state("storeinfo",{
                url:"/storeinfo",
                templateUrl:"app/storeinfo/storeinfo.html",
                params:{
                    'operate':'save'
                }
            })
            //会员充值查询
            .state("memberrechargement",{
                url:"/memberrechargement",
                templateUrl:"app/memberrecharge/memberrechargement.html",
                params:{
                    'operate':'find'
                }
            })
            //会员充值
            .state("memberrecharge",{
                url:"/memberrecharge",
                templateUrl:"app/memberrecharge/memberrecharge.html",
                params:{
                    'operate':'save'
                }
            })
            //系统模块列表
            .state("sysmodulement",{
                url:'/sysmodulement',
                templateUrl:"app/sysrole/sysmodulement.html",
                params:{
                    'operate':'find'
                }
            })
            //系统模块添加
            .state("sysmodule",{
                url:'/sysmodule',
                templateUrl:"app/sysrole/sysmodule.html",
                params:{
                    'operate':'save'
                }
            })
            //系统模块功能编辑
            .state("sysmoduleaction",{
                url:'/sysmoduleaction',
                templateUrl:"app/sysrole/sysmoduleaction.html",
                params:{
                    'operate':'edit'
                }
            })
            //系统模块功能查询
            .state("sysmoduleactionment",{
                url:'/sysmoduleactionment',
                templateUrl:"app/sysrole/sysmoduleactionment.html",
                params:{
                    'operate':'find'
                }
            })
            //系统模块功能单个编辑
            .state("sysmoduleactionsingle",{
                url:'/sysmoduleactionsingle',
                templateUrl:"app/sysrole/sysmoduleactionsingle.html",
                params:{
                    'operate':'edit'
                }
            })
            //系统角色查询
            .state("sysrolement",{
                url:'/sysrolement',
                templateUrl:"app/sysrole/sysrolement.html",
                params:{
                    'operate':'find'
                }
            })
            //系统角色添加
            .state("sysrole",{
                url:'/sysrole',
                templateUrl:"app/sysrole/sysrole.html",
                params:{
                    'operate':'save'
                }
            })
            //系统角色权限添加
            .state("sysroleaction",{
                url:'/sysroleaction',
                templateUrl:"app/sysrole/sysrolemoduleaction.html",
                params:{
                    'operate':'edit'
                }
            })
            //系统用户列表
            .state("basicuserment",{
                url:'/basicuserment',
                templateUrl:"app/basicuser/basicuserment.html",
                params:{
                    'operate':'find'
                }
            })
            //添加系统用户
            .state("basicuser",{
                url:'/basicuser',
                templateUrl:"app/basicuser/basicuser.html",
                params:{
                    'operate':'save'
                }
            })
            //设置系统用户权限
            .state("basicuserrole",{
                url:'/basicuserrole',
                templateUrl:"app/basicuser/basicuserrole.html",
                params:{
                    'operate':'edit'
                }
            })
            //系统导航设置
            .state("sitenav",{
                url:'/sitenav',
                templateUrl:"app/sitenav/sitenav.html",
                params:{
                    'operate':'save'
                }
            })
            //系统导航查询
            .state("sitenavment",{
                url:'/sitenavment',
                templateUrl:"app/sitenav/sitenavment.html",
                params:{
                    'operate':'find'
                }
            })
            //系统邮箱
            .state("sysmailment",{
                url:'/sysmailment',
                templateUrl:"app/sysmail/sysmailment.html",
                params:{
                    'operate':'find'
                }
            })
            //系统邮箱添加
            .state("sysmail",{
                url:'/sysmail',
                templateUrl:"app/sysmail/sysmail.html",
                params:{
                    'operate':'save'
                }
            })
            //添加广告
            .state("advertise",{
                url:'/advertise',
                templateUrl:"app/advertise/advertise.html",
                params:{
                    'operate':'save'
                }
            })
            //广告列表
            .state("advertisement",{
                url:'/advertisement',
                templateUrl:"app/advertise/advertisement.html",
                params:{
                    'operate':'find'
                }
            })
            //广告内容关系列表
            .state("advertisecontentment",{
                url:'/advertisecontentment',
                templateUrl:"app/advertise/advertisecontentment.html",
                params:{
                    'operate':'find'
                }
            })
            //广告内容关系添加
            .state("advertisecontent",{
                url:'/advertisecontent',
                templateUrl:"app/advertise/advertisecontent.html",
                params:{
                    'operate':'save'
                }
            })
            //faq分类添加
            .state("faqarticlescategory",{
                url:'/faqarticlescategory',
                templateUrl:"app/helpcenter/faqarticlescategory.html",
                params:{
                    'operate':'save'
                }
            })
            //faq分类列表
            .state("faqarticlescategoryment",{
                url:'/faqarticlescategoryment',
                templateUrl:"app/helpcenter/faqarticlescategoryment.html",
                params:{
                    'operate':'find'
                }
            })
            //faq添加
            .state("faqarticles",{
                url:'/faqarticles',
                templateUrl:"app/helpcenter/faqarticles.html",
                params:{
                    'operate':'save'
                }
            })
            //faq列表
            .state("faqarticlesment",{
                url:'/faqarticlesment',
                templateUrl:"app/helpcenter/faqarticlesment.html",
                params:{
                    'operate':'find'
                }
            })
            //会员提现列表
            .state("memberwithdrawalsment",{
                url:'/memberwithdrawalsment',
                templateUrl:"app/memberwithdrawals/memberwithdrawalsment.html",
                params:{
                    'operate':'find'
                }
            })
            //会员提现申请
            .state("memberwithdrawals",{
                url:'/memberwithdrawals',
                templateUrl:"app/memberwithdrawals/memberwithdrawals.html",
                params:{
                    'operate':'save'
                }
            })
            //审核会员提现申请
            .state("reviewedmemberwithdrawals",{
                url:'/reviewedmemberwithdrawals',
                templateUrl:"app/memberwithdrawals/reviewedmemberwithdrawals.html",
                params:{
                    'operate':'edit'
                }
            })
            //系统操作转账列表
            .state("sysmemberwithdrawalstransferment",{
                url:'/sysmemberwithdrawalstransferment',
                templateUrl:"app/memberwithdrawals/sysmemberwithdrawalstransferment.html",
                params:{
                    'operate':'find'
                }
            })
            //话题列表
            .state("topicment",{
                url:'/topicment',
                templateUrl:"app/topic/topicment.html",
                params:{
                    'operate':'find'
                }
            })
            //话题
            .state("topic",{
                url:'/topic',
                templateUrl:"app/topic/topic.html",
                params:{
                    'operate':'save'
                }
            })
            //话题文章列表
            .state("topicarticlement",{
                url:'/topicarticlement',
                templateUrl:"app/topic/topicarticlement.html",
                params:{
                    'operate':'find'
                }
            })
            //话题文章添加
            .state("topicarticle",{
                url:'/topicarticle',
                templateUrl:"app/topic/topicarticle.html",
                params:{
                    'operate':'save'
                }
            })
            //话题文章单个评论列表
            .state("topicarticlecommentonement",{
                url:'/topicarticlecommentonement',
                templateUrl:"app/topic/topicarticlecommentonement.html",
                params:{
                    'operate':'find'
                }
            })
            //话题文章回复评论列表
            .state("topicarticlecommentreplyment",{
                url:"/topicarticlecommentreplyment",
                templateUrl:"app/topic/topicarticlecommentreplyment.html",
                data:{
                    operate:'find'
                }
            })
            //话题文章评论列表
            .state("topicarticlecommentment",{
                url:"/topicarticlecommentment",
                templateUrl:"app/topic/topicarticlecommentment.html",
                data:{
                    operate:'find'
                }
            })
            //话题文章评论添加
            .state("topicarticlecomment",{
                url:"/topicarticlecomment",
                templateUrl:"app/topic/topicarticlecomment.html",
                data:{
                    operate:'save'
                }
            });





        //$routeProvider.when('/membergroupment',{
        //    templateUrl:'app/member/membergroupment.html'
        //});
        //$routeProvider.when('/membergroup',{
        //    templateUrl:'app/member/membergroup.html'
        //});
        //// 会员等级制度
        //$routeProvider.when('/membergradement',{
        //    templateUrl:'app/member/membergradement.html'
        //});
        //$routeProvider.when('/membergrade',{
        //    templateUrl:'app/member/membergrade.html'
        //});
        ///**

        ///**
        // * 广告信息
        // */
        //$routeProvider.when('/advertisement',{
        //    templateUrl:'app/advertise/advertisement.html'
        //});
        //$routeProvider.when('/advertise',{
        //    templateUrl:'app/advertise/advertise.html'
        //});
        //
        ///**
        // * 文章
        // */
        //// 文章分类
        //$routeProvider.when('/articlecategoryment',{
        //    templateUrl:'app/article/articlecategoryment.html'
        //});
        //$routeProvider.when('/articlecategory',{
        //    templateUrl:'app/article/articlecategory.html'
        //});
        //// 文章
        //$routeProvider.when('/articlement',{
        //    templateUrl:'app/article/articlement.html'
        //});
        //$routeProvider.when('/article',{
        //    templateUrl:'app/article/article.html'
        //});
        //
        ///**
        // * 支付信息
        // */
        //// 支付信息
        //$routeProvider.when('/paymentment',{
        //    templateUrl:'app/payment/paymentment.html'
        //});
        //$routeProvider.when('/payment',{
        //    templateUrl:'app/payment/payment.html'
        //});
        //// 网银信息
        //$routeProvider.when('/netsilverment',{
        //    templateUrl:'app/payment/netsilverment.html'
        //});
        //$routeProvider.when('/netsilver',{
        //    templateUrl:'app/payment/netsilver.html'
        //});
        //
        ///**
        // * 物流信息管理
        // */
        // // 物流商信息
        // $routeProvider.when('/logisticsbusinessment',{
        //     templateUrl:'app/logistics/logisticsbusinessment.html'
        // });
        // $routeProvider.when('/logisticsbusiness',{
        //     templateUrl:'app/logistics/logisticsbusiness.html'
        // });
        // // 物流商信息
        // $routeProvider.when('/logisticsbusinessareament',{
        //     templateUrl:'app/logistics/logisticsbusinessareament.html'
        // });
        // $routeProvider.when('/logisticsbusinessarea',{
        //     templateUrl:'app/logistics/logisticsbusinessarea.html'
        // });
        //
        // //网站导航
        // $routeProvider.when('/sitenav',{
        //	 templateUrl:'app/sitenav/sitenav.html'
        // });
        // $routeProvider.when('/sitenavment',{
        //	 templateUrl:'app/sitenav/sitenavment.html'
        // });
        //
        // //系统参数设置
        // $routeProvider.when('/setting',{
        //	 templateUrl:'app/setting/setting.html'
        // });
        //
        // /**
        //  * 专题促销
        //  */
        // $routeProvider.when('/promotiontopicment',{
        //     templateUrl:'app/promotiontopic/promotiontopicment.html'
        // });
        // $routeProvider.when('/promotiontopic',{
        //     templateUrl:'app/promotiontopic/promotiontopic.html'
        // });
        //
        // /**
        //  * 专题促销内容
        //  */
        // $routeProvider.when('/promotiontopiccontentment',{
        //     templateUrl:'app/promotiontopiccontent/promotiontopiccontentment.html'
        // });
        // $routeProvider.when('/promotiontopiccontent',{
        //     templateUrl:'app/promotiontopiccontent/promotiontopiccontent.html'
        // });
        // /**
        //  * 订单管理
        //  */
        // $routeProvider.when('/order',{
        //     templateUrl:'app/order/order.html'
        // });

    });
});
